using System;
using System.Collections.Generic;
using MNH.Yarekoodak.DomainClasses;
using MNH.WebApps.Common.Data;

namespace MNH.Yarekoodak.Services.Locations
{
    /// <summary>
    /// Location service interface
    /// </summary>
    public partial interface ILocationService
    {
        /// <summary>
        /// Deletes a location 
        /// </summary>
        /// <param name="location">Location </param>
        void DeleteLocation(Location location);

        /// <summary>
        /// Gets a location 
        /// </summary>
        /// <param name="locationId">Location  identifier</param>
        /// <returns>Location </returns>
        Location GetLocationById(int locationId, bool asNoTrack = false);

        /// <summary>
        /// Get all locationes
        /// </summary>
        /// <param name="dateFrom">Filter by created date; null if you want to get all records</param>
        /// <param name="dateTo">Filter by created date; null if you want to get all records</param>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <param name="showHidden">A value indicating whether to show hidden records</param>
        /// <returns>Locationes</returns>
        IPagedList<Location> GetAllLocations(
            DateTime? dateFrom, DateTime? dateTo, int pageIndex, int pageSize, bool showHidden = false);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerable<Location> GetAllLocations();

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerable<Location> GetAllStates();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="stateId"></param>
        /// <returns></returns>
        IEnumerable<Location> GetAllCitiesByStateId(int stateId);

        /// <summary>
        /// Inserts a location 
        /// </summary>
        /// <param name="location">Location </param>
        void InsertLocation(Location location);

        /// <summary>
        /// Updates the location 
        /// </summary>
        /// <param name="location">Location </param>
        void UpdateLocation(Location location);

        Location GetCapitalByStateId(int stateId);

    }
}
